<!DOCTYPE html>
<html>

<head>
    <title>搜索结果-{$keyword|default=""}</title>
    <meta name="keywords" content="{$keyword|default=" "},{$site_info.site_seo_keywords|default=''}" />
    <meta name="description" content="{$keyword|default=" "},{$site_info.site_seo_description|default=''}">
    <include file="public@head" />
    <hook name="before_head_end" />
    <link href="__TMPL__/public/assets/css/slippry/slippry.css" rel="stylesheet">
</head>

<body class="body-black">
    <include file="public@nav" />
    <div class="container tc-main">
        <div class="list-breadcrumb">
            全部结果
            <notempty name="keyword"><b></b><span>{$keyword|default=''}</span></notempty>
        </div>
        <div class="">
            <div class="cars-hot-title">
                <h1 class="">搜索车型推荐</h1>
                <div class="tip">SEARCH RESULTS</div>
                <div class="clearboth"></div>
            </div>
            <div class="row">
                <php>
                    $search_where =""; empty($category_id)|| $brand_where['category_id']=['eq',$category_id]; $search_where['title']= ['like',"%$keyword%"] ;
                </php>
                <div class="row no-margin search-box">
                    <rental:cars where="$search_where" page="12" order="update_time DESC" categoryIds="$category_id">
                        <div class="col-md-3 car-box">
                            <div class="tc-gridbox ">
                                <a href="{:cmf_url( 'rental/Car/index',array( 'id'=>$vo.id,'cid'=>$vo.category_id))}">
                                    <div class="header">
                                        <div class="item-image">
                                            <present name="vo.more.thumbnail">
                                                <empty name="vo.more.thumbnail">
                                                    <img src="__TMPL__/public/assets/images/default-thumbnail.png" class="img-responsive" alt="">
                                                    <else/>
                                                    <img src="{:cmf_get_image_url($vo.more.thumbnail)}" class="img-responsive" alt="">
                                                </empty>
                                                <else/>
                                                <img src="__TMPL__/public/assets/images/default-thumbnail.png" class="img-responsive" alt="">
                                            </present>
                                        </div>
                                        <h3 class="title">
                                            {$vo.title}
                                        </h3>
                                        <eq name="vo.category_id" value="$rental_category">
                                            <div class="title price">
                                                <span class="now-price">一口价：{$vo.primary.price}万/天</span>&nbsp;&nbsp;&nbsp;<span class="m-price">市场价：{$vo.primary.m_price}万/天</span>
                                            </div>
                                            <else/>
                                            <div class="title price">
                                                <span class="now-price">一口价：{$vo.primary.price}万</span>&nbsp;&nbsp;&nbsp;<span class="m-price">市场价：{$vo.primary.m_price}万</span>
                                            </div>
                                        </eq>
                                    </div>
                                </a>
                            </div>
                        </div>
                    </rental:cars>
                </div>
            </div>
            <div class="text-center">
                <ul class="pagination">
                    <page/>
                </ul>
            </div>
        </div>
    </div>

    <include file="public@footer" />
    <include file="public@scripts" />
    <script src="__TMPL__/public/assets/js/slippry.min.js "></script>
    <script>
        $(function() {
            function setLose() {
                if ($('.search-box div.car-box').length <= 0) {
                    $('.search-box').html('<div class="text-center lose">没有找到您想要到，看看别的吧！</div>');
                }
            }
            setLose();
            $("#news-slippry ").slippry({
                transition: 'fade',
                useCSS: true,
                pagerClass: 'news-sy-pager',
                captions: false,
                speed: 1000,
                pause: 3000,
                auto: true,
                preload: 'visible'
            });

        });

        $('.list-select li a').click(function() {
            var url = $('.select-form').attr('action');
            var select = $(this).attr('select');
            var data = $(this).attr('data');
            $('.select-form').find('input[name=' + select + ']').val(data);
            var query = $('.select-form').find('input').serialize();
            query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
            query = query.replace(/^&/g, '');
            //console.log(url);
            console.log(query);
            if (url.indexOf('?') > 0) {
                url += '&' + query;
            } else {
                url += '?' + query;
            }
            console.log(url);
            window.location.href = url;
            // alert($(this).attr('elect-data'));
        });
    </script>

    <hook name="before_body_end" />
</body>

</html>